Repository navigation
docs(lint): put translation-section-name-missing's warning on its own reading - #18970
Conversation
…wn reading `validate-translatable-sections`'s Severity note justified its `warning` by citing its sibling rule's reading — a position the sibling abandoned when `translation-target-unknown` was promoted to `error`. The conclusion is unchanged and correct; only the borrowed argument was stale, so the note now spells out the reading that actually holds here: a nameless section misdescribes nothing, whereas an orphan locale key is a confident-looking grep hit for a surface that was deleted. `validate-translation-references.test.ts`'s docblock narrated the superseded note in the present tense; its tense and claim are corrected. No assertion, no severity, no schema moves — comments only. Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check
What this run could not see
Coarse fallback — 4 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
裁断:A ——
|
Fixes #18768
Clause-②: no
packages/lint/src/validate-translatable-sections.tsjustified its ownwarningseverity by citing its sibling rule's reading. The sibling abandoned that reading at
#16310, which promoted
translation-target-unknownfromwarningtoerror. Theconclusion is still right; the argument was not. This rewrites the Severity note so it
stands on its own reading, and fixes the one other place that narrates the superseded
note in the present tense.
Comments and docblock prose only — no severity, no schema, no assertion moves.
Subject leg — the Severity note, sentence by sentence
Before (
validate-translatable-sections.ts:42-47), four sentences:Same reading as its sibling rule (ADR-0072 D1): nothing crashes and nothing is dead — one heading renders in the source locale.That is weaker than the dead references validate-object-references reports as errors, and the severity should say so.Requiring name outright is a SCHEMA change (FormSection.name is optional today), …… which is a breaking authoring change needing a maintainer decision and a migration — deliberately not taken here.Sentence 1 is the whole defect: it is an appeal to a neighbour's position, and the
neighbour moved. Sentences 2 to 4 were always this rule's own and are kept.
After, the mapping:
inheriting it — the sibling
stopped holding this reading at #16310, and the verdicthere
survives that; the borrowed argument for it did not. The second states thereading that actually holds here:
A nameless section MISDESCRIBES NOTHING— thesection is real and renders, the whole cost is one heading staying in the source
locale, and it
leaves behind no artefact for the next author to trust: there is no key, so there is nothing to grep. The contrast with the orphan key the sibling gateson (a confident-looking hit, in every locale, for a surface that was DELETED) is the
asymmetry that earns that one
errorand this onewarning.only to read as an addition:
It is weaker … too).The reasoning is not invented here.
packages/lint/src/reference-integrity-suite.ts:406already carries it —
warning-only on its own reading — NOT on its sibling's any more.That file is read as evidence and is not touched by this PR; the rule's own header is
now consistent with it.
Second carrier — narration only
packages/lint/src/validate-translation-references.test.ts:24-28described thesuperseded note in the present tense (
the rule's own Severity note argued an orphan key is inert), inviting a reader to go find an argument that the same change deleted. Thenarration is now past-tense and self-limiting (
the rule's Severity note AS IT THEN STOOD argued that an orphan key was inert), with a pointer that the note itself was rewritten.No assertion moved. All ten
severity: 'error'sites in that file are byte-identical;only their line numbers shift by +2 because the docblock grew two lines. A diff restricted
to non-comment lines in that file is empty:
Firing control — the probe cannot be fooled by a line wrap
Both anchors this round turns on are wrapped across comment lines, and so is the card's
designated positive control (
skills/objectstack-i18n/SKILL.md:196-197). A line-scopedgit grep -Freads 0 on two of the three needles below — on the unedited tree, whereall three are present. The census therefore strips comment leaders, collapses all
whitespace including newlines to one space, and only then matches.
Same reading as its sibling rule (ADR-0072 D1)warning-only on its own reading — NOT on its sibling's any more`translation-target-unknown` is an **error** and fails the runPopulation: 8885 tracked text files (10 binary/non-file skipped). The two 1s are read in
the same run as the 0, so the 0 is a reading and not a dead index.
DARK
packages/lintbefore and after, both through the shared verify lock:identical on both sides, plus
pnpm --filter @objectstack/lint typecheckgreen after.Repo-wide
eslint . --no-inline-configat this branch's head: 6855 files, 0 errors,0 warnings, exit 0.
Changeset —
skip-changeset, measured rather than assumed@objectstack/lintpublishesfiles: ["dist","README.md","CHANGELOG.md"]. Built at BASEand at BASE-plus-this-diff in two separate worktrees and compared file by file:
index.js,index.cjs,runtime.js,runtime.cjs,index.d.ts,index.d.cts,runtime.d.ts,runtime.d.cts— every executable and every type output..mapfiles, in exactly one field.version,sourcesandnamesare identical;
sourcesContentis absent on both sides (this repo gates that withcheck:sourcemap-no-sources-content), so no source text — and therefore no commentprose — ships at all. What moved is
mappings, the original-position index, becausecode moved 15 lines down a source file.
files[]path: the changed prose scores 0 hits, while thepositive control
translation-section-name-missingscores hits in 6distfiles.So nothing an upgrading consumer can read, grep, type-check or execute differs. The
.mapshift is the unavoidable arithmetic of editing any comment above code in a builtpackage, not a published change. Flagged here rather than assumed, because a
byte-comparison of the tarball does technically move.
Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, derivedon this tree, run one by one with each exit code landed to disk before anything read it,
then reconciled with
--ran:The two NOT-MEASURED are
check:dual-build-cjs-loadsandcheck:type-check-debt. Bothexited 3 — their own
PREREQUISITE NOT METcode, which each gate's output states isneither a pass nor a failure. Both need the whole workspace built (83 packages and 27
dependency closures respectively); CI builds before running them.
check:lean-entry-closurewas in the same state, its one prerequisite package was built,and it then passed.
Acceptance notes
validate-translation-references.test.ts's docblock saysEight assertions in this file pinned severity: 'warning'. That is a statement about the lint: an orphaned locale key is unfailable —translation-target-unknownis warning-only and its rule id carries no namespace, so no app can gate it #16310 cohort and is stillexactly right — the landing commit flipped eight and added one. The file carries ten
textual
'error'sites today, the tenth having landed since. Noted, not filed: thesentence is not wrong, and nothing reads that number.
docs/audits/2026-07-app-metadata-reference-integrity-assessment.md:93still sayswarningfor this rule. It is stampedLanded 2026-07-28and was true then; leftalone deliberately.
Generated by Claude Code